<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('新增代理银行')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-dlyhwh-add">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">代理银行编码：</label>
                <div class="col-sm-8">
                    <input name="yhbm" class="form-control" type="text" maxlength="3" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">代理银行名称：</label>
                <div class="col-sm-8">
                    <input name="yhmc" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">帐号：</label>
                <div class="col-sm-8">
                    <input name="skrzh" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">收款人名称：</label>
                <div class="col-sm-8">
                    <input name="skrmc" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">电话：</label>
                <div class="col-sm-8">
                    <input name="dh" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">地址：</label>
                <div class="col-sm-8">
                    <input name="dz" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">联系人：</label>
                <div class="col-sm-8">
                    <input name="lxr" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">启用标志：</label>
                <div class="col-sm-8"> 
                     <select name="qybz" class="form-control" required>
					     <option value="0">启用</option>
						 <option value="1">停用</option>
					 </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">专户类型：</label>
                <div class="col-sm-8"> 
                    <select name="zhlx" class="form-control" required>
					     <option value="财政专户">财政专户</option>
						 <option value="汇缴结算户">汇缴结算户</option>
					</select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var prefix = ctx + "system/dlyhwh"
        $("#form-dlyhwh-add").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
            	var yhbm=$("input[name='yhbm']").val();
            	if(yhbm.length!=3){
        			$.modal.alertWarning("银行编码长度不正确");
        			return false;
        		}
            	if(!$.common.numValid(yhbm)){
        			$.modal.alertWarning("银行编码只能为数字");
        			return false;
        		}
                $.operate.save(prefix + "/add", $('#form-dlyhwh-add').serialize());
            }
        }
    </script>
</body>
</html>